package 竞赛.NO_399;

/**
 * 创建时间： 2024-05-26 10:28
 **/
public class 优质数对的总数I_100323 {
    public static void main(String[] args) {
        Solution s = new Solution();
        System.out.println(s.numberOfPairs(new int[]{1, 3, 4}, new int[]{1, 3, 4}, 1));
    }

    static class Solution {
        public int numberOfPairs(int[] nums1, int[] nums2, int k) {
            int ans = 0;
            for (int i = 0; i < nums1.length; i++) {
                for (int j = 0; j < nums2.length; j++) {
                    if (nums1[i] % (nums2[j] * k) == 0) {
                        ans++;
                    }
                }
            }
            return ans;
        }
    }
}